package com.manjason.property.lang;

import java.io.File;

import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;

import com.manjason.property.Property;

public class Lang {
	private static Property plugin = null;
	private static File f;
	private static FileConfiguration lang;
	static {
		plugin = Property.getInstance();
		f = new File(plugin.getDataFolder(), "lang_" + plugin.config.getString("language") + ".yml");
		lang = YamlConfiguration.loadConfiguration(f);
	}

	public static void reload() {
		f = new File(plugin.getDataFolder(), "lang_" + plugin.config.getString("language") + ".yml");
		lang = YamlConfiguration.loadConfiguration(f);
	}

	public static String get(int id) {
		return lang.getString("lang_" + id);
	}
}
